<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>

<html lang="en">
<head>
<%@ include file="/common/common-css.jsp"%>

</head>
<body class="no-skin">
	<form name="queryForm" method="post" id="queryForm">
		<div class="col-md-12">
			<table id="info" class="table table-bordered table-striped table-hover table-condensed table-responsive table"></table>
		</div>
		<div class="col-md-12">
			<textarea rows="5" cols="100%" id="memo" name="memo"></textarea>
		</div>
		<div class="col-md-12">
			<button class="btn  btn-success no-border" name="btn-save" id="btn-save" >
				<i class="ace-icon fa fa-floppy-o bigger-160"></i> 确认
			</button>
		</div>
	</form>
	

<%@ include file="/common/common-js.jsp" %>

<script>
		
		function getQueryString(name) {
		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
 			var r = window.location.search.substr(1).match(reg);
		if (r != null) return decodeURI(r[2]); return null;
 		}
			jQuery(function() {
				if(getQueryString("memo") != "null"){
					$("#memo").text(getQueryString("memo"));
				}
				//【提交】按钮Click事件
				$("#btn-save").bind("click",function() {
						$("#btn-save").attr("disabled","disabled");
						var data = $('#queryForm').serializeObject();
						 $.ajax({
							 url: ctx + "/phonefee/updateMemo.action?id="+getQueryString("id"),
							 dataType:"json",
							 data : data,
							 type:"POST",
							 success: function(data){
								if(data.status != 1){
									alert(data.result.msg);
								}else{
									parent.parent['__extdialog_active'].dialog('close');
									parent.main_frame.query_any();	
								}
							},
							error : function(XMLHttpRequest,textStatus, errorThrown) {
								$(".load_bg").attr("style","display:none");
								$(".load_img").attr("style","display:none");
								alert('请求服务器错误,请刷新重试！！');//错误提示，包括服务器重启导致的session失效
							},
					});
				});
				
			});
	</script>
</body>
</html>